<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="线索处理" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <!-- <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button> -->
                    <div class="input-group pull-right clearfix">
                        <select class="form-control" ng-model="condition.status">
                                <option value="">处理状态</option>
                                <option value="1">已核实</option>
                                <option value="0">待核实</option>
                        </select>      
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
                <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix">
                            <label class="control-label">发货通知单号：</label>
                            <input type="text" ng-model="condition.deliveryNo" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">是否过账：</label>
                            <select class="form-control" ng-model="condition.isPosting">
                                <option value="">请选择</option>
                                <option value="1">是</option>
                                <option value="0">否</option>
                            </select>
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">零件凭证号：</label>
                            <input type="text" ng-model="condition.materialsBillNo" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">零件中文名：</label>
                            <input type="text" ng-model="condition.materialsDes" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">零件号：</label>
                            <input type="text"  ng-model="condition.materialsNo" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">出库点：</label>
                            <input type="text" ng-model="condition.outArea" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">客户名称：</label>
                            <input type="text" ng-model="condition.purchaseOrgName" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">销售单号：</label>
                            <input type="text" ng-model="condition.saleNo" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">SAP外向发货单：</label>
                            <input type="text" ng-model="condition.sapOutBill" class="form-control">
                        </div>

                        <div class="form-group clearfix">
                            <label class="control-label">SAP销售订单：</label>
                            <input type="text" name="sapSaleOrder" ng-model="condition.sapSaleOrder" class="form-control">
                        </div>


                        <div class="form-group clearfix">
                            <label class="control-label">出库状态：</label>
                            <select class="form-control" ng-model="condition.status">
                                <option value="">请选择</option>
                                <option value="0">未出库</option>
                                <option value="1">部分出库</option>
                                <option value="2">已出库</option>
                                <option value="3">强制结单</option>
                            </select>
                        </div>

                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="false"
                 has-check-col="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataList)"></div>
                                </th>
                                <th width="130" class="border-l-none">
                                    操作
                                </th>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList)"></div>
                                </td>
                                <td width="130" class="font-0">
                                    <button class="btn btn-operate m-r-sm" ng-click="updateDbRemark(item)" ng-disabled="!btnPermission.clueProcessingEdit || item.status == 1"
                                    title="{{!btnPermission.clueProcessingEdit?'无权限执行此操作':''}}">编辑</button>
                                    <button class="btn btn-operate" ng-click="importAttach(item)" ng-disabled="!btnPermission.clueProcessingUpload"
                                    title="{{!btnPermission.clueProcessingUpload?'无权限执行此操作':''}}">上传附件</button>    
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate' && !itemCol.slot">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)" ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <a class="btn-operate m-r-xs" ng-click="viewTo(itemCol.dataField, item)" ng-if="!!itemCol.slot && itemCol.dataField != 'down' ">
                                        查看
                                    </a>
                                    <a class="btn-operate m-r-xs" ng-click="downloadAttach(item)" ng-if="!!itemCol.slot && itemCol.dataField == 'down' ">
                                         <span ng-if="item.attach">点击下载</span> 
                                    </a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                     yb-click="selectAll(dataList)"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>